<?php

	/**
	 * @see Bike_Js_VarPart_Object
	 */
	require_once 'Bike/Js/VarPart/Object.php';
	
	
	class Bike_Js_ResponseObject extends Bike_Js_VarPart_Object
	{
		static protected $_partOffset = 0;

		protected function initDefaultSettings()
		{
			parent::initDefaultSettings();
		
			$this->setSettings(array(
				'success' => True,
				'msg' => '',
				'data' => '',
			));
		}

		protected function _makeOptions(array $Args=null)
		{
			$options = array();
			$argsCount = sizeof($Args);
			if($argsCount)
			{
				if($argsCount == 1 && is_array($Args[0]))
				{
					$options = $Args[0];
				}
			}
			return $options;
		}

		public function _toString()
		{
			return ($this->getArgsNeeded() ? join(',', (array) $this->getArgs()) : '');
		}
	}
